<script setup lang="ts">
import {  RouterView } from 'vue-router'
import { useRoute } from 'vue-router';
import { onMounted } from 'vue';
import { useQueryParams } from '@/utils/httpParamsHandler'
import {getJsSdk} from '@/api/gis'
let route = useRoute()
useQueryParams(route)

onMounted(()=>{
  wxconfig()
})
const wxconfig=()=>{
      let thisurl = window.location.href.split('#')[0]
      getJsSdk({url:thisurl}).then((res:any)=>{
        if( res.success ){
          let config = res.data
          wx.config({
            debug: false, 
            // appId: 'wx4592813f5a12470d',
            appId: 'wx039ce9f7803eb1a1',
            timestamp: config.timestamp,
            nonceStr: config.nonceStr,
            signature: config.signature,
            jsApiList: ['getLocation','openLocation'] 
            // jsapiTicketstr: config.jsapiTicket,
            // urlstr: config.url
          })
        }
    })
  }
</script>
<template>
  <RouterView />
</template>
<style>
#app{
  overflow: hidden;
}
*{
  outline: none !important;
}
.esri-view .esri-view-surface--touch-none {
    touch-action: none;
}
</style>
<style lang="scss" scoped>
*{
  --van-checkbox-checked-icon-color:#07c160;
  --van-checkbox-checked-icon-color:#07c160;
  --van-radio-checked-icon-color:#07c160;
  --van-step-active-color:#07c160;
  --van-button-normal-font-size:12px;
  --van-button-normal-padding:2px 4px;
  --van-button-default-height: 30px;
  --van-button-default-line-height:30px;

}
</style>
